package cbfg.butil.demo

import android.content.Context
import java.io.BufferedReader
import java.io.InputStreamReader

/**
 * @author:  Tom Hawk
 * 添加时间: 2020/9/7 10:57
 * 功能描述:
 */
object Utils {
    @JvmStatic
    fun getLongTxt(context: Context): String {
        context.assets.open("string.txt").use { ips ->
            val sb = StringBuilder()
            BufferedReader(InputStreamReader(ips)).use { br ->
                while (true) {
                    val str = br.readLine() ?: break
                    sb.append(str)
                }
            }
            return sb.toString()
        }
    }
}